#include <stdio.h>

/* 查看gcc所定义的所有预定义宏，可运行"cpp -dM /dev/null "*/

void os_info()
{
	printf("\n--- %s ---\n", __func__);
	printf("unix : %d\n", __unix__); //__unix, unix
}

void gcc_info()
{
	printf("\n--- %s ---\n", __func__);
	printf("gcc version: %d.%d.%d\n", __GNUC__, __GNUC_MINOR__, __GNUC_PATCHLEVEL__);
	printf("gcc version: %s\n", __VERSION__);
}

void compile_info()
{
	printf("\n--- %s ---\n", __func__);
	printf("date : %s\n", __DATE__);
	printf("time : %s\n", __TIME__);
}

void file_info()
{
	printf("\n--- %s ---\n", __func__);
	printf("file name: %s\n", __FILE__);
	printf("line no. : %d\n", __LINE__);
	printf("function : %s\n", __func__);
	printf("modify time: %s\n", __TIMESTAMP__);
}

void counter_info()
{
	printf("\n--- %s ---\n", __func__);
}

int main(int argc, char const* argv[])
{
	os_info();
	gcc_info();
	file_info();
	compile_info();
	counter_info();
	return 0;
}
